import asyncio

from data import config
from utils.db_api import quick_commands as commands
from utils.db_api.db_gino import db


async def db_test():
    await db.set_bind(config.POSTGRES_URI)
    await db.gino.drop_all()
    await db.gino.create_all()

    await commands.add_user(1, 'Vadim', 'Net')
    await commands.add_user(123, 'Vadim', 'Lexa')

    users = await commands.select_all_users()

    print(users)


loop = asyncio.get_event_loop()
loop.run_until_complete(db_test())